package br.com.swp.campestre.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

@Entity
@SequenceGenerator(sequenceName="Quadra_seq" ,  name="Quadra_seq" , allocationSize=1)
@Table(uniqueConstraints=@UniqueConstraint(columnNames="codigo"))
public class Quadra implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3988185934572597003L;
	// seam-gen attributes (you should probably edit these)
    private Long id;
    private int version;
    private String codigo;
    private Integer qtLotes;
    private Integer qtLotesVendidos;
    private Loteamento loteamento;

    // add additional entity attributes

    // seam-gen attribute getters/setters with annotations (you probably should edit)

    @Id @GeneratedValue(strategy=GenerationType.SEQUENCE , generator="Quadra_seq")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Version
    public int getVersion() {
        return version;
    }

    private void setVersion(int version) {
        this.version = version;
    }

	public Integer getQtLotes() {
		return qtLotes;
	}

	public void setQtLotes(Integer qtLotes) {
		this.qtLotes = qtLotes;
	}

	public Integer getQtLotesVendidos() {
		return qtLotesVendidos;
	}

	public void setQtLotesVendidos(Integer qtLotesVendidos) {
		this.qtLotesVendidos = qtLotesVendidos;
	}

	@ManyToOne
	public Loteamento getLoteamento() {
		return loteamento;
	}

	public void setLoteamento(Loteamento loteamento) {
		this.loteamento = loteamento;
	}

	
	public String getCodigo() {
		return codigo;
	}

	public void setCodigo(String codigo) {
		this.codigo = codigo;
	}
    
    

}
